package cn.com.api.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cn.com.api.entity.ApiT_token;
import cn.com.api.entity.ApiToken;
import cn.com.api.mapper.ApiTokenMapper;
import cn.com.api.service.ApiTokenService;

@Service
public class ApiTokenServiceImpl implements ApiTokenService {

	@Autowired
	private ApiTokenMapper apitokenMapper;

	@Override
	public boolean addToken(ApiToken token) {
		return apitokenMapper.addToken(token);
	}

	@Override
	public boolean updateToken(ApiToken token) {
		return apitokenMapper.updateToken(token);
	}

	@Override
	public boolean updateTokenByOpenId(ApiToken token) {
		return apitokenMapper.updateTokenByOpenId(token);
	}

	@Override
	public ApiToken searByOpenId(String openid) {
		return apitokenMapper.searByOpenId(openid);
	}
}
